package com.sky.mapper.courier;

import com.sky.pojo.Courier;
import com.sky.pojo.CourierTradeOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourierMapper {
    @Select("select * from tb_courier where on_job = 1")
    List<Courier> findBJobOnCouriers();

    List<Courier> queryByIds(List<Long> courierIds);

    @Select("select * from tb_courier where telephone=#{telephone}")
    Courier selectByTelephone(String telephone);

    @Select("select * from tb_courier where id = #{id}")
    Courier findById(Integer id);

    @Select("select * from tb_courier_trade_order where order_number=#{tradeNumber}")
    CourierTradeOrder findByOrderNumber(String tradeNumber);

    @Select("select * from tb_courier where id=#{courierId}")
    Courier selectById(Long id);
}
